<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class SignupController extends MY_Controller {

	/**
	 */
	public function index() {
		if($this->is_post()) {
			//$error = new ErrorVo();
			
			//validação dos campos.
			$rules = array(
					array(
							'field' => 'user_email',
							'label' => '',
							'rules' => 'trim|xss_clean'
					),
					array(
							'field' => 'user_password',
							'label' => '',
							'rules' => 'trim|xss_clean'
					)
			);
				
			$validate = $this->form_validation->validate_data( $rules );
			//Verificaa validação do formulario
				
			if( $validate[ 'status' ] ) {
				$form = $validate['data'];
			}
			else {
				$this->message_error = "Ocoreu algum erro Preencha novamente!!!";
			}			
		}
		
		$dados = array(
			'title' => PAGE_TITLE,
			'description' => PAGE_DESCRIPTION
		);
		
		$this->load_view('login/index', $dados);
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */